import request from '@/utils/request'
import { url as phpUrl } from '../utils/php'
const url = phpUrl()

/**
 * 获取省份列表
 * @param params
 */
export function getProvinceList(params) {
  return request({
    url: url + 'provinces',
    method: 'get',
    params: params
  })
}

/**
 * 获取所有院校
 * @param params
 */
export function getAcademyList(params) {
  return request({
    url: url + 'academies',
    method: 'get',
    params: params
  })
}
export function getAdvisoryList(params) {
  return request({
    url: url + 'advisories',
    method: 'get',
    params: params
  })
}
/**
 * 添加咨询
 * @param data
 */
export function createAdvisory(data) {
  return request({
    url: url + 'advisories',
    method: 'post',
    data: data
  })
}
/**
 * 编辑咨询
 * @param data
 */
export function updateAdvisory(data, id) {
  return request({
    url: url + 'advisories/' + id,
    method: 'put',
    data: data
  })
}

/**
 * 编辑咨询
 */
export function deleteAdvisory(id) {
  return request({
    url: url + 'advisories/' + id,
    method: 'delete'
  })
}

